package com.hutao.manage.mapper;

import java.util.List;
import java.util.Map;

import org.apache.ibatis.annotations.Param;

import com.hutao.manage.pojo.HospitalizationNote;
import com.hutao.manage.query.MedRecordQuery;
import com.hutao.manage.query.MedTraceQuery;
import com.hutao.manage.query.MedVisitUrgeQuery;
import com.hutao.manage.query.MedicalSearchQuery;

public interface HospitalizationNoteMapper {


    int deleteByPrimaryKey(Integer id);

    int insert(HospitalizationNote record);

    int insertSelective(HospitalizationNote record);


    HospitalizationNote selectByPrimaryKey(Integer id);



    int updateByPrimaryKeySelective(HospitalizationNote record);

    int updateByPrimaryKey(HospitalizationNote record);
    
    List<Map<String,Object>> getHospitalizationNoteList(MedRecordQuery params);
    
    List<Map<String,Object>> getHospitalizationNoteOfPrinterList(MedRecordQuery params);
    
    List<Map<String,Object>> getHospitalizationNoteByFirstGuid(String firstGuid);
    
    int getHospitalizationNoteCount(MedRecordQuery params);
    
    int getHospitalizationNoteCountOfPrinter(MedRecordQuery params);
    
    
    /**
     * 依据就诊Guid获取住院基本信息
     * @param firstGuid
     * @return
     */
    List<Map<String,Object>> getHospitalizationNoteBasicByFirstGuid(String firstGuid);
    
    
    HospitalizationNote selectByFirstGuid(String firstGuid);
    
    
    List<Map<String,Object>> getCollectionStatistics(MedTraceQuery params);
    
    List<Map<String,Object>> getUnPigeonhole(MedRecordQuery params);
    
    int getUnPigeonholeCount(MedRecordQuery params);
    
    
    List<Map<String,Object>> getPigeonholed(MedRecordQuery params);
    
    //导出病案借阅到excel
    List<Map<String,Object>> exportBorrowToExcel(MedRecordQuery params);
    
    List<Map<String,Object>> exportUnPigeonholeToExcel(MedRecordQuery params);
    
    int getPigeonholedCount(MedRecordQuery params);
    
    List<Map<String,Object>> getMedicalVisitOfUnUrge(MedVisitUrgeQuery params);
    
    /**
     * 病案上传查询病案信息
     * @param medicalSearchQuery
     * @return
     */
    List<Map<String,Object>> getMedRecordList(MedicalSearchQuery medicalSearchQuery);
    
    
    /**
     * 病案上传查询病案信息总数
     * @param medicalSearchQuery
     * @return
     */
    int getMedRecordListCount(MedicalSearchQuery medicalSearchQuery);
    
    /**
     * 根据firstGuid查询住院病案信息
     * @param firstGuid
     * @return
     */
    Map<String,Object> getHospitalNoteByFirstGuid(@Param("firstGuid") String firstGuid);
    
    /**
     * 编目病案查询数据
     * @param params
     * @return
     */
    List<Map<String,Object>> getHospitalizationNoteOfHomePageList(MedRecordQuery params);
    
    int getHospitalizationNoteOfHomePageCount(MedRecordQuery params);
    
    /**
     * 病案检索 mobile
     * @param params
     * @return
     */
    List<Map<String, Object>> getMedicalSearchListPage(Map<String, Object> params);
    
    int getMedicalSearchCountPage(Map<String, Object> params);
    
    //缺项分页统计
    List<Map<String, Object>> getLacunaStatisticsPage(MedRecordQuery params);
   
    //缺项分页统计总页数
    int getLacunaStatisticsCountPage(MedRecordQuery params);
    
    //某份病案的编目缺少项
    String getLacunaCodeStrByFirstGuid(String firstGuid);
    
    List<Map<String, Object>> getHospNoteByMrIdAndVisitNumber(@Param("mrId") String mrId, @Param("visitNumber") String visitNumber);
    

    int getHospitalizationNoteCountByMrIdAndOnlyId(@Param("mrId")String mrId,@Param("visitNumber")Integer visitNumber);
    
    
}



